﻿using FluentValidation;
using System;
using System.Collections.Generic;
using System.Text;

namespace WYT.Usr.Application.Contracts.Dtos.User.DtoValidators
{
    /// <summary>
    /// 手机号码登录实体验证
    /// </summary>
    public class TelLoginDtoValidator : AbstractValidator<TelLoginDto>
    {
        public TelLoginDtoValidator()
        {
            RuleFor(x => x.Code).NotEmpty();
            RuleFor(x => x.Tel).NotEmpty().Matches(@"^[1]+\d{10}").WithMessage("电话号码格式错误");
        }
    }
}
